/**
 * 路由配置（方便本地打包，使用了HashRouter）;
 * tips:开发环境下面使用了browserHistory，打包上线的时候需要服务器进行配置;
 */
import React from 'react';
import {BrowserRouter as Router, Switch, Route, Redirect} from 'react-router-dom';
import SiderDemo from '../component/home/home'
import Login from '../component/login/login'
import AuthRoute from '../component/authroute/authroute'

const Routes = () => (
  <Router>
    <div className="wrapper">
      <AuthRoute></AuthRoute>
      <Switch>
        <Route path='/login' component={Login}/>
        <Route path='/' component={SiderDemo}/>
        <Route component={SiderDemo}></Route>
      </Switch>
    </div>
  </Router>
);

export default Routes;